Skip to content

Update Palindrome_or_not.java#76

Open
aakankshasuvarna27 wants to merge 1 commit intoronijpandey:masterfrom
aakankshasuvarna27:patch-1
Open

Update Palindrome_or_not.java#76
aakankshasuvarna27 wants to merge 1 commit intoronijpandey:masterfrom
aakankshasuvarna27:patch-1

Conversation

@aakankshasuvarna27
Copy link

  1. Simplified the comparison
  2. The logic uses a more efficient StringBuilder to reverse the string
  3. Fixed typos such as Sting (in the main method) and System.out.prinltn
  4. Closed the Scanner to prevent resource leaks
  5. Used equals() instead of compareTo() since we are simply checking for equality

1. Simplified the comparison 
2. The logic uses a more efficient StringBuilder to reverse the string
3. Fixed typos such as Sting (in the main method) and System.out.prinltn
4. Closed the Scanner to prevent resource leaks
5. Used equals() instead of compareTo() since we are simply checking for equality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments